<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="../../common/EditUIHead.jsp"></jsp:include>
<script type="text/javascript" src="${base}/default/js/module/basedata/org/positionSetting.js"></script>
<title>组织</title>
</head>
<body style="padding:1px 3px 1px 3px;overflow:auto">
	<div id="main">
		<div position="center">
			<form id="dataForm" class="l-form" action="${base }/basedata/org/positionSave" method="post">
		  		<input type="hidden" id="org.id" name="org.id" value="${org.id}"/>
		  		<input type="hidden" id="positionJson" name="positionJson"/>
		  		<ul>
		  			<li class="field_label_li">组织：</li>
		  			<li style="width:182px;text-align:left;">
						<label>${org.name }</label>
					</li>
		  			<li class="field_split_li"></li>
		  			<li class="field_label_li"></li>
		  			<li style="width:182px;text-align:left;"></li>
		  			<li class="field_split_li"></li>
		  			<li class="field_label_li"></li>
		  			<li style="width:182px;text-align:right;">
		  				<a href="javascript:void(0);" onclick="addPosition();">增加</a>
		  			</li>
		  		</ul>
		  		<c:forEach items="${positions }" var="p" varStatus="ps">
		  			<ul index="${ps.index }">
			  			<li class="field_label_li">岗位：</li>
			  			<li style="width:182px;text-align:left;">
			  				<input type="hidden" name="id" value="${p.id }"/>
							<div class="f7" id="job_${ps.index }" dataPickerUrl="${base}/framework/dataPicker/list?query=jobQuery" width="480px" height="360px" onchange="changePosition" title="岗位">
		                		<input dataPicker="value"  name="job.id" value="${p.job.id }" type="hidden" readOnly="readOnly" />
		                		<input dataPicker="name" ondblclick="openDataPicker('job_${ps.index }')" value="${p.job.name}" name="job.name" readonly="readonly" type="text"/>
			        			<strong onclick="clearDataPicker('job_${ps.index }')"></strong>
			        			<span class="p_hov" onclick="openDataPicker('job_${ps.index }')"></span>
			        		</div>
						</li>
			  			<li class="field_split_li"></li>
			  			<li class="field_label_li">职位名称：</li>
			  			<li style="width:182px;text-align:left;">
			  				<input type="text" id="name_${ps.index }" name="name" value="${p.name }"/>
			  			</li>
			  			<li class="field_split_li"></li>
			  			<li class="field_label_li"></li>
			  			<li style="width:182px;text-align:left;">
			  				<label><input type="checkbox" name="leading" value="1" onchange="checkLeading" <c:if test="${p.leading==true }">checked="checked"</c:if>/>负责人职位</label>
			  			</li>
			  		</ul>
		  		</c:forEach>
			</form>
		</div>
	</div>
</body>
</html>